package org.xin.framework.controller;

import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import org.xin.common.result.Result;
import org.xin.framework.base.controller.IBaseController;
import org.xin.framework.pojo.entity.SysDictionaryItem;
import org.xin.framework.service.ISysDictionaryItemService;

/**
* <p>
    * 系统模块-字典条目表 前端控制器
    * </p>
*
* @author: xin
* @date: Create in 2021-10-09
*/
@Api(tags = "系统模块-字典条目")
@CrossOrigin
@RestController
@RequestMapping("/sysDictionaryItem")
public class SysDictionaryItemController extends IBaseController<SysDictionaryItem, ISysDictionaryItemService> {
    @ApiOperation("获取字典下的条目")
    @GetMapping("/getDictionaryItems/{dictonaryId}")
    public Result getDictionaryItems(@PathVariable("dictonaryId") String dictonaryId){
        return Result.success(service.selectByDictionaryId(dictonaryId));
    }
}

